class HomePagesController < ApplicationController
  layout 'home_page'
  skip_before_action :verify_login

  def home_page

  end

  def post_view
    @post = Post.find(params[:id])
    return redirect_to root_path, notice: '该资源不存在' if @post.status_unpublished?
    render template: 'posts/show'
  end
end
